package org.apache.dubbo.demo.example;

import org.junit.Before;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AbstractProvider {

  protected ClassPathXmlApplicationContext context;

  @Before
  public void before() {
    String name = this.getClass().getPackage().getName();
    String pack = name.substring(name.lastIndexOf(".") + 1);
    String path = "classpath:example/" + pack + "/applicationContext.xml";
    context = new ClassPathXmlApplicationContext(path);
  }

}
